home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / b / b.lha / B / src / bed / keys.h < prev    next >
C/C++ Source or Header  |  1988-11-24  |  2KB  |  67 lines

  1. /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1984. */
  2. /* $Header: keys.h,v 2.3 85/08/22 16:04:38 timo Exp $ */
  3.  
  4. /*
  5.  * B editor -- Function key and control character definitions.
  6.  */
  7.  
  8.  
  9. #define Ctl(x) ('x'&037)
  10.  
  11. /*
  12.  * Commands bound to control characters.
  13.  *
  14.  * Not all control characters can be freely used:
  15.  * ^Q and ^S are used by the Unix operating system
  16.  * for output flow control, and ^Z is used by BSD
  17.  * Unix systems for `job control'.
  18.  *
  19.  * Also note that ^H, ^I and ^M (and somtimes ^J) have their
  20.  * own keys on most keyboards and thus usually have a strong
  21.  * intuitive meaning.
  22.  */
  23.  
  24. #define COPY    Ctl(C)
  25. #define DELETE    Ctl(D)
  26. #define GOTO    Ctl(G)
  27. #define UNDO    Ctl(H)
  28. #define ACCEPT    Ctl(I)        /* TAB */
  29. #define NEWLINE    Ctl(J)
  30. #define REDRAW    Ctl(L)
  31. #define RETURN    Ctl(M)
  32. #define RECORD    Ctl(R)
  33. #define PLAYBACK    Ctl(P)
  34. #define USEMACRO    PLAYBACK
  35. #define SAVEMACRO    RECORD
  36. #define REDO    Ctl(U)
  37. #define EXIT    Ctl(X)
  38.  
  39.  
  40. /*
  41.  * Commands bound to ESC sequences.
  42.  *
  43.  * When 'inchar()' in "getc.c" sees an ESC-x sequence, it
  44.  * will return (x&0177)|MASK.
  45.  */
  46.  
  47. #define MASK 0200 /* Must fit in a character! */
  48.  
  49. #define WIDEN        ('w'|MASK) /* so "\ew" is recognized as WIDEN */
  50. #define NARROW        ('f'|MASK) /* FIRST */
  51. #define RNARROW        ('l'|MASK) /* LAST */
  52. #define EXTEND        ('e'|MASK)
  53.  
  54. #define UPLINE        ('u'|MASK)
  55. #define PREVIOUS    ('p'|MASK)
  56. #define NEXT        ('n'|MASK)
  57. #define DOWNLINE    ('d'|MASK)
  58.  
  59. #define LEFTARROW    (','|MASK)
  60. #define RITEARROW    ('.'|MASK)
  61. #define UPARROW        ('U'|MASK)
  62. #define DOWNARROW    ('D'|MASK)
  63.  
  64. #ifdef HELPFUL
  65. #define HELP    ('?'|MASK)
  66. #endif HELPFUL
  67.